import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '../views/Home.vue'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    name: 'Home',
    meta: { title: '首页' },
    component: Home,
    redirect: '/index',
    children:[
      {path: '/index',name: 'index',component: () => import('../views/index/index.vue'),},//首页
      {path:"/shoplist",name:"shopList",component:()=>import("../views/shop/ShopList.vue")},//商品列表
      {path:"/commodity",name:"commodity",component:()=>import("../views/shop/Commodity.vue")},//商品组
      {path:"/Classification",name:"classification",component:()=>import("../views/shop/Classification.vue")},//分类管理
      {path:"/brand",name:"brand",component:()=>import("../views/shop/Brand.vue")},//品牌管理
      {path:"/setting",name:"setting",component:()=>import("../views/shop/Setting.vue")},//设置
      {path:"/Overview",name:"overview",component:()=>import("../views/Order/Overview.vue")},//订单概述
      {path:"/state",name:"state",component:()=>import("../views/Order/State.vue")},//订单状态
      {path:"/management",name:"management",component:()=>import("../views/Order/Management.vue")},//维权管理
      {path:"/tool",name:"tool",component:()=>import("../views/Order/Tool.vue")},//工具
      {path:"/integral",name:"integral",component:()=>import("../views/Finance/Integral.vue")},//积分明细
      {path:"/balance",name:"balance",component:()=>import("../views/Finance/Balance.vue")},//余额明细
      {path:"/bill",name:"bill",component:()=>import("../views/Finance/Bill.vue")},//对账单管咯
      {path:"/Topup",name:"Topup",component:()=>import("../views/Finance/Topup.vue")},//充值记录
      {path:"/basic",name:"basic",component:()=>import("../views/Preferential/Basic.vue")},//基本功能
      {path:"/securities",name:"securities",component:()=>import("../views/Preferential/Securities.vue")},//优惠劵管理
      {path:"/tabulation",name:"tabulation",component:()=>import("../views/Vip/tabulation.vue")},//会员列表
      {path:"/summary",name:"summary",component:()=>import("../views/Vip/summary.vue")},//会员概述
      {path:"/grade",name:"grade",component:()=>import("../views/Vip/grade.vue")},//会员等级
      {path:"/groups",name:"groups",component:()=>import("../views/Vip/groups.vue")},//分组设置
      {path:"/seckill",name:"seckill",component:()=>import("../views/Move/Seckill.vue")},//秒杀管理
      {path:"/Collage",name:"collage",component:()=>import("../views/Move/Collage.vue")},//平图案管理
      //积分商城
      {path:"/rotation",name:"rotation",component:()=>import("../views/Integral/Rotation.vue")},//商品列表
      {path:"/Product",name:"Product",component:()=>import("../views/Integral/Product List.vue")},//轮播图管理
      {path:"/Classification",name:"Classification",component:()=>import("../views/Integral/Classification.vue")},//分类管理
      {path:"/status",name:"status",component:()=>import("../views/Integral/Status.vue")},//状态管理
      //权限管理
      {path:"/store",name:"store",component:()=>import("../views/Limits/Store.vue")},//门店管理
      {path:"/admin",name:"admin",component:()=>import("../views/Limits/Administrators.vue")},//管理员管理
      {path:"/shop",name:"shop",component:()=>import("../views/Limits/Shop.vue")},//店员管理
      {path:"/examine",name:"examine",component:()=>import("../views/Limits/Examine.vue")},//提现审核
      {path:"/role",name:"role",component:()=>import("../views/Limits/Role.vue")},//角色管理
      //评价管理
      {path:"/Roles",name:"role",component:()=>import("../views/Role/Role.vue")},//评价管理
      //信息管理
      {path:"/idea",name:"idea",component:()=>import("../views/Information/Idea.vue")},//意见反馈
      {path:"/cooperate",name:"cooperate",component:()=>import("../views/Information/Cooperate.vue")},//合作
      {path:"/medicice",name:"medicice",component:()=>import("../views/Information/Medicine.vue")},//用药问答
      {path:"/vipitem",name:"vipitem",component:()=>import("../views/Vip/vipitem.vue")},//vip详情
      {path:"/updategrade",name:"updategrade",component:()=>import("../views/Vip/updategrade.vue")},//修改vip等级页数据
      {path:"/postgrade",name:"postgrade",component:()=>import("../views/Vip/postgrade.vue")},//添加vip等级页数据
      {path:"/addkill",name:"addkill",component:()=>import("../views/Move/addkill.vue")},//添加会场页数据
      {path:"/updatekill",name:"updatekill",component:()=>import("../views/Move/updatekill.vue")},//修改会场页数据
      {path:"/addkill2",name:"addkill2",component:()=>import("../views/Move/addkill2.vue")},//添加商品页数据
      {path:"/updatekill2",name:"updatekill2",component:()=>import("../views/Move/updatekill2.vue")},//修改会场页数据
    ]
  },
  {path: '/login',name: 'login',component: () => import('../views/Login.vue'),},//登录页
  {
    path: '/about',
    name: 'About',
    // route level code-splitting
    // this generates a separate chunk (about.[hash].js) for this route
    // which is lazy-loaded when the route is visited.
    component: () => import(/* webpackChunkName: "about" */ '../views/About.vue')
  }
]

const router = new VueRouter({
  routes
})

export default router
